3.196 \(\int x \cot ^2(a+i \log (x)) \, dx\)

Optimal. Leaf size=55 \[ -\frac {2 e^{4 i a}}{-x^2+e^{2 i a}}-2 e^{2 i a} \log \left (-x^2+e^{2 i a}\right )-\frac {x^2}{2} \]

[Out]

-1/2*x^2-2*exp(4*I*a)/(exp(2*I*a)-x^2)-2*exp(2*I*a)*ln(exp(2*I*a)-x^2)

________________________________________________________________________________________

Rubi [F]  time = 0.04, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \[ \int x \cot ^2(a+i \log (x)) \, dx \]

Verification is Not applicable to the result.

[In]

Int[x*Cot[a + I*Log[x]]^2,x]

[Out]

Defer[Int][x*Cot[a + I*Log[x]]^2, x]

Rubi steps

\begin {align*} \int x \cot ^2(a+i \log (x)) \, dx &=\int x \cot ^2(a+i \log (x)) \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.13, size = 142, normalized size = 2.58 \[ \frac {2 \cos (3 a)+2 i \sin (3 a)}{\left (x^2-1\right ) \cos (a)-i \left (x^2+1\right ) \sin (a)}+2 i \cos (2 a) \tan ^{-1}\left (\frac {\cot (a)-x^2 \cot (a)}{x^2+1}\right )-4 \sin (a) \cos (a) \tan ^{-1}\left (\frac {\cot (a)-x^2 \cot (a)}{x^2+1}\right )-\cos (2 a) \log \left (-2 x^2 \cos (2 a)+x^4+1\right )-i \sin (2 a) \log \left (-2 x^2 \cos (2 a)+x^4+1\right )-\frac {x^2}{2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*Cot[a + I*Log[x]]^2,x]

[Out]

-1/2*x^2 + (2*I)*ArcTan[(Cot[a] - x^2*Cot[a])/(1 + x^2)]*Cos[2*a] - Cos[2*a]*Log[1 + x^4 - 2*x^2*Cos[2*a]] - 4
*ArcTan[(Cot[a] - x^2*Cot[a])/(1 + x^2)]*Cos[a]*Sin[a] - I*Log[1 + x^4 - 2*x^2*Cos[2*a]]*Sin[2*a] + (2*Cos[3*a
] + (2*I)*Sin[3*a])/((-1 + x^2)*Cos[a] - I*(1 + x^2)*Sin[a])

________________________________________________________________________________________

fricas [A]  time = 0.98, size = 61, normalized size = 1.11 \[ -\frac {x^{4} - x^{2} e^{\left (2 i \, a\right )} + 4 \, {\left (x^{2} e^{\left (2 i \, a\right )} - e^{\left (4 i \, a\right )}\right )} \log \left (x^{2} - e^{\left (2 i \, a\right )}\right ) - 4 \, e^{\left (4 i \, a\right )}}{2 \, {\left (x^{2} - e^{\left (2 i \, a\right )}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cot(a+I*log(x))^2,x, algorithm="fricas")

[Out]

-1/2*(x^4 - x^2*e^(2*I*a) + 4*(x^2*e^(2*I*a) - e^(4*I*a))*log(x^2 - e^(2*I*a)) - 4*e^(4*I*a))/(x^2 - e^(2*I*a)
)

________________________________________________________________________________________

giac [B]  time = 0.27, size = 118, normalized size = 2.15 \[ -\frac {x^{4}}{2 \, {\left (x^{2} - e^{\left (2 i \, a\right )}\right )}} - \frac {2 \, x^{2} e^{\left (2 i \, a\right )} \log \left (-x^{2} + e^{\left (2 i \, a\right )}\right )}{x^{2} - e^{\left (2 i \, a\right )}} + \frac {x^{2} e^{\left (2 i \, a\right )}}{2 \, {\left (x^{2} - e^{\left (2 i \, a\right )}\right )}} + \frac {2 \, e^{\left (4 i \, a\right )} \log \left (-x^{2} + e^{\left (2 i \, a\right )}\right )}{x^{2} - e^{\left (2 i \, a\right )}} + \frac {2 \, e^{\left (4 i \, a\right )}}{x^{2} - e^{\left (2 i \, a\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cot(a+I*log(x))^2,x, algorithm="giac")

[Out]

-1/2*x^4/(x^2 - e^(2*I*a)) - 2*x^2*e^(2*I*a)*log(-x^2 + e^(2*I*a))/(x^2 - e^(2*I*a)) + 1/2*x^2*e^(2*I*a)/(x^2
- e^(2*I*a)) + 2*e^(4*I*a)*log(-x^2 + e^(2*I*a))/(x^2 - e^(2*I*a)) + 2*e^(4*I*a)/(x^2 - e^(2*I*a))

________________________________________________________________________________________

maple [A]  time = 0.06, size = 44, normalized size = 0.80 \[ -\frac {5 x^{2}}{2}-\frac {2 x^{2}}{\frac {{\mathrm e}^{2 i a}}{x^{2}}-1}-2 \,{\mathrm e}^{2 i a} \ln \left ({\mathrm e}^{2 i a}-x^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cot(a+I*ln(x))^2,x)

[Out]

-5/2*x^2-2*x^2/(exp(2*I*a)/x^2-1)-2*exp(2*I*a)*ln(exp(2*I*a)-x^2)

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 296, normalized size = 5.38 \[ -\frac {x^{4} - {\left (4 \, {\left (-i \, \cos \left (2 \, a\right ) + \sin \left (2 \, a\right )\right )} \arctan \left (\sin \relax (a), x + \cos \relax (a)\right ) + 4 \, {\left (i \, \cos \left (2 \, a\right ) - \sin \left (2 \, a\right )\right )} \arctan \left (\sin \relax (a), x - \cos \relax (a)\right ) + \cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} x^{2} + {\left (-4 i \, \cos \left (2 \, a\right )^{2} + 8 \, \cos \left (2 \, a\right ) \sin \left (2 \, a\right ) + 4 i \, \sin \left (2 \, a\right )^{2}\right )} \arctan \left (\sin \relax (a), x + \cos \relax (a)\right ) + {\left (4 i \, \cos \left (2 \, a\right )^{2} - 8 \, \cos \left (2 \, a\right ) \sin \left (2 \, a\right ) - 4 i \, \sin \left (2 \, a\right )^{2}\right )} \arctan \left (\sin \relax (a), x - \cos \relax (a)\right ) + {\left (x^{2} {\left (2 \, \cos \left (2 \, a\right ) + 2 i \, \sin \left (2 \, a\right )\right )} - 2 \, \cos \left (2 \, a\right )^{2} - 4 i \, \cos \left (2 \, a\right ) \sin \left (2 \, a\right ) + 2 \, \sin \left (2 \, a\right )^{2}\right )} \log \left (x^{2} + 2 \, x \cos \relax (a) + \cos \relax (a)^{2} + \sin \relax (a)^{2}\right ) + {\left (x^{2} {\left (2 \, \cos \left (2 \, a\right ) + 2 i \, \sin \left (2 \, a\right )\right )} - 2 \, \cos \left (2 \, a\right )^{2} - 4 i \, \cos \left (2 \, a\right ) \sin \left (2 \, a\right ) + 2 \, \sin \left (2 \, a\right )^{2}\right )} \log \left (x^{2} - 2 \, x \cos \relax (a) + \cos \relax (a)^{2} + \sin \relax (a)^{2}\right ) - 4 \, \cos \left (4 \, a\right ) - 4 i \, \sin \left (4 \, a\right )}{2 \, x^{2} - 2 \, \cos \left (2 \, a\right ) - 2 i \, \sin \left (2 \, a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cot(a+I*log(x))^2,x, algorithm="maxima")

[Out]

-(x^4 - (4*(-I*cos(2*a) + sin(2*a))*arctan2(sin(a), x + cos(a)) + 4*(I*cos(2*a) - sin(2*a))*arctan2(sin(a), x
- cos(a)) + cos(2*a) + I*sin(2*a))*x^2 + (-4*I*cos(2*a)^2 + 8*cos(2*a)*sin(2*a) + 4*I*sin(2*a)^2)*arctan2(sin(
a), x + cos(a)) + (4*I*cos(2*a)^2 - 8*cos(2*a)*sin(2*a) - 4*I*sin(2*a)^2)*arctan2(sin(a), x - cos(a)) + (x^2*(
2*cos(2*a) + 2*I*sin(2*a)) - 2*cos(2*a)^2 - 4*I*cos(2*a)*sin(2*a) + 2*sin(2*a)^2)*log(x^2 + 2*x*cos(a) + cos(a
)^2 + sin(a)^2) + (x^2*(2*cos(2*a) + 2*I*sin(2*a)) - 2*cos(2*a)^2 - 4*I*cos(2*a)*sin(2*a) + 2*sin(2*a)^2)*log(
x^2 - 2*x*cos(a) + cos(a)^2 + sin(a)^2) - 4*cos(4*a) - 4*I*sin(4*a))/(2*x^2 - 2*cos(2*a) - 2*I*sin(2*a))

________________________________________________________________________________________

mupad [B]  time = 2.19, size = 45, normalized size = 0.82 \[ -\frac {2\,{\mathrm {e}}^{a\,4{}\mathrm {i}}}{{\mathrm {e}}^{a\,2{}\mathrm {i}}-x^2}-2\,\ln \left (x^2-{\mathrm {e}}^{a\,2{}\mathrm {i}}\right )\,{\mathrm {e}}^{a\,2{}\mathrm {i}}-\frac {x^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cot(a + log(x)*1i)^2,x)

[Out]

- (2*exp(a*4i))/(exp(a*2i) - x^2) - 2*log(x^2 - exp(a*2i))*exp(a*2i) - x^2/2

________________________________________________________________________________________

sympy [A]  time = 0.29, size = 42, normalized size = 0.76 \[ - \frac {x^{2}}{2} - 2 e^{2 i a} \log {\left (x^{2} - e^{2 i a} \right )} + \frac {2 e^{4 i a}}{x^{2} - e^{2 i a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cot(a+I*ln(x))**2,x)

[Out]

-x**2/2 - 2*exp(2*I*a)*log(x**2 - exp(2*I*a)) + 2*exp(4*I*a)/(x**2 - exp(2*I*a))

________________________________________________________________________________________